package com.nedjahi.premiere.application;

import android.app.Activity;
import android.os.Bundle;
import android.widget.Button;
import android.widget.TextView;
import android.view.MotionEvent;
import android.view.View;

public class MainActivity extends Activity {//implements View.OnClickListener{
	//private TextView coucou = null;
	//private String hello = null;
	//Button superbe = null;
	//Button but = null;
    Button sizer = null;
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.truc_lineaire);
		/*coucou = (TextView)findViewById(R.id.text);
		hello = this.getResources().getString(R.string.hello_world);
		coucou.setText(hello);
		superbe = (Button) findViewById(R.id.button1);
		but = (Button) findViewById(R.id.button2);
		superbe.setOnClickListener(this);
		but.setOnClickListener(this);*/
		sizer = (Button) findViewById(R.id.bouton);
		sizer.setOnTouchListener(new View.OnTouchListener() {
			
			@Override
			public boolean onTouch(View v, MotionEvent event) {
				sizer.setTextSize(Math.abs(event.getX() - sizer.getWidth() / 2) 
						+ Math.abs(event.getY() - sizer.getHeight() / 2));
				return false;
			}
		});
		
		
	}

	//@Override
	/*public void onClick(View v) {
        int id = v.getId();
		switch(id) {

		case R.id.button1:
			if(hello.equals(this.getResources().getString(R.string.title_activity_main))){
				hello = this.getResources().getString(R.string.hello_world);
			}
			else{
				hello = this.getResources().getString(R.string.title_activity_main);
			}
			coucou.setText(hello);
			break;

		case R.id.button2:
			if(hello.equals(this.getResources().getString(R.string.app_name)))
				hello = this.getResources().getString(R.string.button_txt);
			else
				hello = this.getResources().getString(R.string.app_name);
			coucou.setText(hello);
			break;
		}
	}*/
}
